Kinetis SDK API Reference Manual  1.0.0-beta
Freescale Semiconductor, Inc.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages

The section describes the programming interface of the eDMA HAL driver. More...

Data Structures

union  edma_tcd_control_t
 eDMA TCD control configuration More...
 
struct  edma_minorloop_offset_config_t
 eDMA TCD Minor loop mapping configuration More...
 
union  edma_error_status_all_t
 Error status of the eDMA module. More...
 
struct  edma_software_tcd_t
 eDMA TCD More...
 
struct  edma_config_t
 DMA configuration structure. More...
 

Enumerations

enum  edma_status_t {
  kStatus_EDMA_Success = 0U,
  kStatus_EDMA_InvalidArgument = 1U,
  kStatus_EDMA_Fail = 2U
}
 eDMA status More...
 
enum  edma_channel_priority_t { kEdmaChannelPriority = 16 }
 Priority limitation of the eDMA channel.
 
enum  edma_modulo_t {
  kEdmaModuloDisable = 0x0U,
  kEdmaModulo2bytes = 0x1U,
  kEdmaModulo4bytes = 0x2U,
  kEdmaModulo8bytes = 0x3U,
  kEdmaModulo16bytes = 0x4U,
  kEdmaModulo32bytes = 0x5U,
  kEdmaModulo64bytes = 0x6U,
  kEdmaModulo128bytes = 0x7U,
  kEdmaModulo256bytes = 0x8U,
  kEdmaModulo512bytes = 0x9U,
  kEdmaModulo1Kbytes = 0xaU,
  kEdmaModulo2Kbytes = 0xbU,
  kEdmaModulo4Kbytes = 0xcU,
  kEdmaModulo8Kbytes = 0xdU,
  kEdmaModulo16Kbytes = 0xeU,
  kEdmaModulo32Kbytes = 0xfU,
  kEdmaModulo64Kbytes = 0x10U,
  kEdmaModulo128Kbytes = 0x11U,
  kEdmaModulo256Kbytes = 0x12U,
  kEdmaModulo512Kbytes = 0x13U,
  kEdmaModulo1Mbytes = 0x14U,
  kEdmaModulo2Mbytes = 0x15U,
  kEdmaModulo4Mbytes = 0x16U,
  kEdmaModulo8Mbytes = 0x17U,
  kEdmaModulo16Mbytes = 0x18U,
  kEdmaModulo32Mbytes = 0x19U,
  kEdmaModulo64Mbytes = 0x1aU,
  kEdmaModulo128Mbytes = 0x1bU,
  kEdmaModulo256Mbytes = 0x1cU,
  kEdmaModulo512Mbytes = 0x1dU,
  kEdmaModulo1Gbytes = 0x1eU,
  kEdmaModulo2Gbytes = 0x1fU
}
 eDMA modulo configuration
 
enum  edma_transfer_size_t {
  kEdmaTransferSize1bytes = 0x0U,
  kEdmaTransferSize2bytes = 0x1U,
  kEdmaTransferSize4bytes = 0x2U,
  kEdmaTransferSize16bytes = 0x4U,
  kEdmaTransferSize32bytes = 0x5U
}
 eDMA transfer size configuration
 
enum  edma_bandwidth_configuration_t {
  kEdmaBandwidthStallNone = 0,
  kEdmaBandwidthStall4Cycle = 2,
  kEdmaBandwidthStall8Cycle = 3
}
 Bandwidth control configuration. More...
 
enum  edma_group_priority_t {
  kEdmaGroup0Priority0Group1Priority1,
  kEdmaGroup0Priority1Group1Priority0
}
 eDMA group priority
 

EDMA HAL common configuration

void edma_hal_init (uint32_t instance, const edma_config_t *init)
 Initializes the eDMA module. More...
 
static void edma_hal_cancel_transfer (uint32_t instance)
 Cancels the remaining data transfer. More...
 
static void edma_hal_error_cancel_transfer (uint32_t instance)
 Cancels the remaining data transfer. More...
 
static void edma_hal_set_minor_loop_mapping (uint32_t instance, bool isEnabled)
 Enables/Disables the minor loop mapping. More...
 
static void edma_hal_set_continuous_mode (uint32_t instance, bool isContinuous)
 Configures the continuous mode. More...
 
static void edma_hal_halt (uint32_t instance)
 Halts the DMA Operations. More...
 
static void edma_hal_clear_halt (uint32_t instance)
 Clears the halt bit. More...
 
static void edma_hal_set_halt_on_error (uint32_t instance, bool isHaltOnError)
 Halts the eDMA module when an error occurs. More...
 
static void edma_hal_set_fixed_priority_channel_arbitration (uint32_t instance)
 The fixed priority arbitration is used for the channel selection. More...
 
static void edma_hal_set_roundrobin_channel_arbitration (uint32_t instance)
 The round robin arbitration is used for the channel selection. More...
 
static void edma_hal_set_debug_mode (uint32_t instance, bool isEnabled)
 Enables/Disables the eDMA DEBUG mode. More...
 
static uint32_t edma_hal_get_error_status (uint32_t instance)
 Gets the error status of the eDMA module. More...
 
static void edma_hal_disable_all_enabled_error_interrupt (uint32_t instance)
 Disables the interrupt when an error happens on any of channel in the eDMA module. More...
 
static void edma_hal_enable_all_channel_error_interrupt (uint32_t instance)
 Enables an interrupt when an error happens on any channel in the eDMA module. More...
 
static void edma_hal_disable_all_channel_dma_request (uint32_t instance)
 Disables the DMA request for all eDMA channels. More...
 
static void edma_hal_enable_all_channel_dma_request (uint32_t instance)
 Enables the DMA request for all eDMA channels. More...
 
static void edma_hal_clear_all_channel_done_status (uint32_t instance)
 Clears the done status for all eDMA channels. More...
 
static void edma_hal_trigger_all_channel_start_bit (uint32_t instance)
 Triggers all channel start bits. More...
 
static void edma_hal_clear_all_channel_error_status (uint32_t instance)
 Clears the error status for all eDMA channels. More...
 
static void edma_hal_clear_all_channel_interrupt_request (uint32_t instance)
 Clears an interrupt request for all eDMA channels. More...
 
static uint32_t edma_hal_get_all_channel_interrupt_request_status (uint32_t instance)
 Gets the interrupt status for all eDMA channels. More...
 
static uint32_t edma_hal_get_all_channel_error_status (uint32_t instance)
 Gets the channel error status for all eDMA channels. More...
 
static uint32_t edma_hal_get_all_channel_dma_request_status (uint32_t instance)
 Gets the status of the DMA request for all DMA channels. More...
 

EDMA HAL channel configuration.

static bool edma_hal_check_dma_request_enable_status (uint32_t instance, uint32_t channel)
 Check whether the channel DMA request is enabled. More...
 
static void edma_hal_disable_error_interrupt (uint32_t instance, uint32_t channel)
 Disables an interrupt when an error happens in the eDMA channel. More...
 
static void edma_hal_enable_error_interrupt (uint32_t instance, uint32_t channel)
 Enables an interrupt when an error happens in the eDMA channel. More...
 
static void edma_hal_disable_dma_request (uint32_t instance, uint32_t channel)
 Disables the DMA request for an eDMA channel. More...
 
static void edma_hal_enable_dma_request (uint32_t instance, uint32_t channel)
 Enables the DMA request for a specified eDMA channel. More...
 
static void edma_hal_clear_done_status (uint32_t instance, uint32_t channel)
 Clears the done status for an eDMA channel. More...
 
static void edma_hal_trigger_start_bit (uint32_t instance, uint32_t channel)
 Starts an eDMA channel manually. More...
 
static void edma_hal_clear_error_status (uint32_t instance, uint32_t channel)
 Clears an error status for the eDMA channel. More...
 
static void edma_hal_clear_interrupt_request (uint32_t instance, uint32_t channel)
 Clears an interrupt request for the eDMA channel. More...
 
static void edma_hal_set_channel_preemp_ability (uint32_t instance, uint32_t channel, bool isDisabled)
 Configures the preempt feature for an eDMA channel. More...
 
static void edma_hal_set_channel_preemption_ability (uint32_t instance, uint32_t channel, bool isEnabled)
 Configures the preempt feature for the eDMA channel. More...
 
static void edma_hal_set_channel_priority (uint32_t instance, uint32_t channel, uint32_t priority)
 Configures the eDMA channel priority. More...
 

eDMA HAL hardware TCD configuration

static void edma_hal_htcd_configure_source_address (uint32_t instance, uint32_t channel, uint32_t address)
 Configures the source address for the hardware TCD. More...
 
static void edma_hal_htcd_configure_source_offset (uint32_t instance, uint32_t channel, int16_t offset)
 Configures the source address signed offset for the hardware TCD. More...
 
static void edma_hal_htcd_configure_source_modulo (uint32_t instance, uint32_t channel, edma_modulo_t modulo)
 Configures the source modulo for the hardware TCD. More...
 
static void edma_hal_htcd_configure_source_transfersize (uint32_t instance, uint32_t channel, edma_transfer_size_t size)
 Configures the source data transfersize for the hardware TCD. More...
 
static void edma_hal_htcd_configure_dest_modulo (uint32_t instance, uint32_t channel, edma_modulo_t modulo)
 Configures the destination modulo for the hardware TCD. More...
 
static void edma_hal_htcd_configure_dest_transfersize (uint32_t instance, uint32_t channel, edma_transfer_size_t size)
 Configures the destination data transfersize for the hardware TCD. More...
 
static void edma_hal_htcd_configure_nbytes_minorloop_disabled (uint32_t instance, uint32_t channel, uint32_t nbytes)
 Configures the nbytes if minor loop mapping is disabled for the hardware TCD. More...
 
static void edma_hal_htcd_configure_nbytes_minorloop_enabled_offset_disabled (uint32_t instance, uint32_t channel, uint32_t nbytes)
 Configures the nbytes if the minor loop mapping is enabled and offset is disabled for the hardware TCD. More...
 
static void edma_hal_htcd_configure_nbytes_minorloop_enabled_offset_enabled (uint32_t instance, uint32_t channel, uint32_t nbytes)
 Configures the nbytes if the minor loop mapping is enabled and offset is enabled for the hardware TCD. More...
 
uint32_t edma_hal_htcd_get_nbytes_configuration (uint32_t instance, uint32_t channel)
 Gets the nbytes configuration data. More...
 
static void edma_hal_htcd_configure_minorloop_offset (uint32_t instance, uint32_t channel, edma_minorloop_offset_config_t config)
 Configures the minorloop offset for the hardware TCD. More...
 
static void edma_hal_htcd_configure_source_last_adjustment (uint32_t instance, uint32_t channel, int32_t size)
 Configures the last source address adjustment for the hardware TCD. More...
 
static void edma_hal_htcd_configure_dest_address (uint32_t instance, uint32_t channel, uint32_t address)
 Configures the destination address for the hardware TCD. More...
 
static void edma_hal_htcd_configure_dest_offset (uint32_t instance, uint32_t channel, int16_t offset)
 Configures the destination address signed offset for the hardware TCD. More...
 
static void edma_hal_htcd_configure_dest_last_adjustment_or_scatter_address (uint32_t instance, uint32_t channel, uint32_t address)
 Configures the last source address adjustment or the memory address for the next transfer control for the hardware TCD. More...
 
static void edma_hal_htcd_configure_bandwidth (uint32_t instance, uint32_t channel, edma_bandwidth_configuration_t bandwidth)
 Configures the bandwidth for the hardware TCD. More...
 
static void edma_hal_htcd_configure_majorlink_channel (uint32_t instance, uint32_t channel, uint32_t majorchannel)
 Configures the major link channel number for the hardware TCD. More...
 
static uint32_t edma_hal_htcd_get_majorlink_channel (uint32_t instance, uint32_t channel)
 Gets the major link channel for the hardware TCD. More...
 
static void edma_hal_htcd_set_majorlink (uint32_t instance, uint32_t channel, bool isEnabled)
 Enables/Disables the major link channel feature for the hardware TCD. More...
 
static void edma_hal_htcd_set_scatter_gather_process (uint32_t instance, uint32_t channel, bool isEnabled)
 Enables/Disables the scatter/gather feature for the hardware TCD. More...
 
static bool edma_hal_htcd_is_gather_scatter_enabled (uint32_t instance, uint32_t channel)
 Checks whether the scatter/gather feature is enabled for the hardware TCD. More...
 
static void edma_hal_htcd_set_disable_dma_request_after_tcd_done (uint32_t instance, uint32_t channel, bool isDisabled)
 Disables/Enables the DMA request after the major loop completes for the hardware TCD. More...
 
static void edma_hal_htcd_set_half_complete_interrupt (uint32_t instance, uint32_t channel, bool isEnabled)
 Enables/Disables the half complete interrupt for the hardware TCD. More...
 
static void edma_hal_htcd_set_complete_interrupt (uint32_t instance, uint32_t channel, bool isEnabled)
 Enables/Disables the interrupt after the major loop completes for the hardware TCD. More...
 
static void edma_hal_htcd_trigger_channel_start (uint32_t instance, uint32_t channel)
 Triggers the start bits for the hardware TCD. More...
 
static bool edma_hal_htcd_is_channel_active (uint32_t instance, uint32_t channel)
 Checks whether the channel is running for the hardware TCD. More...
 
static bool edma_hal_htcd_is_channel_done (uint32_t instance, uint32_t channel)
 Checks whether the major loop is exhausted for the hardware TCD. More...
 
static void edma_hal_htcd_set_minor_link (uint32_t instance, uint32_t channel, bool isEnabled)
 Enables/Disables the channel link after the minor loop for the hardware TCD. More...
 
static void edma_hal_htcd_set_current_minor_link (uint32_t instance, uint32_t channel, bool isEnabled)
 Enables/Disables the channel link after the minor loop in the current register for the hardware TCD. More...
 
static void edma_hal_htcd_configure_minor_link_channel (uint32_t instance, uint32_t channel, uint32_t minorchannel)
 Configures the minor loop link channel for the hardware TCD. More...
 
static void edma_hal_htcd_configure_current_minor_link_channel (uint32_t instance, uint32_t channel, uint32_t minorchannel)
 Configures the minor loop link channel in the current register for the hardware TCD. More...
 
static void edma_hal_htcd_configure_majorcount_minorlink_disabled (uint32_t instance, uint32_t channel, uint32_t count)
 Configures the major count if the minor loop channel link is disabled for the hardware TCD. More...
 
static void edma_hal_htcd_configure_current_majorcount_minorlink_disabled (uint32_t instance, uint32_t channel, uint32_t count)
 Configures the current major count if the minor loop channel link is disabled for the hardware TCD. More...
 
static void edma_hal_htcd_configure_majorcount_minorlink_enabled (uint32_t instance, uint32_t channel, uint32_t count)
 Configures the major count if the minor loop channel link is enabled for the hardware TCD. More...
 
static void edma_hal_htcd_configure_current_majorcount_minorlink_enabled (uint32_t instance, uint32_t channel, uint32_t count)
 Configures the current major count if the minor loop channel link is enabled for the hardware TCD. More...
 
uint32_t edma_hal_htcd_get_current_major_count (uint32_t instance, uint32_t channel)
 Gets the current major loop count. More...
 
uint32_t edma_hal_htcd_get_begin_major_count (uint32_t instance, uint32_t channel)
 Gets the beginning major loop count. More...
 
uint32_t edma_hal_htcd_get_unfinished_bytes (uint32_t instance, uint32_t channel)
 Gets the bytes number not to be transferred for the hardware TCD. More...
 
uint32_t edma_hal_htcd_get_finished_bytes (uint32_t instance, uint32_t channel)
 Gets the number of already transferred bytes for the hardware TCD. More...
 

eDMA HAL software TCD configuration

static void edma_hal_stcd_configure_source_address (edma_software_tcd_t *stcd, uint32_t address)
 Configures the source address for the software TCD. More...
 
static void edma_hal_stcd_configure_source_offset (edma_software_tcd_t *stcd, uint32_t offset)
 Configures the source address for the software TCD. More...
 
static void edma_hal_stcd_configure_source_modulo (edma_software_tcd_t *stcd, edma_modulo_t modulo)
 Configures the source modulo for the software TCD. More...
 
static void edma_hal_stcd_configure_source_transfersize (edma_software_tcd_t *stcd, edma_transfer_size_t size)
 Configures the source data transfersize for the software TCD. More...
 
static void edma_hal_stcd_configure_dest_modulo (edma_software_tcd_t *stcd, edma_modulo_t modulo)
 Configures the destination modulo for the software TCD. More...
 
static void edma_hal_stcd_configure_dest_transfersize (edma_software_tcd_t *stcd, edma_transfer_size_t size)
 Configures the destination data transfersize for the software TCD. More...
 
static void edma_hal_stcd_configure_nbytes_minorloop_disabled (edma_software_tcd_t *stcd, uint32_t nbytes)
 Configures the nbytes if minor loop mapping is disabled the for software TCD. More...
 
static void edma_hal_stcd_configure_nbytes_minorloop_enabled_offset_disabled (edma_software_tcd_t *stcd, uint32_t nbytes)
 Configures the nbytes if the minor loop mapping is enabled and offset is disabled for the software TCD. More...
 
static void edma_hal_stcd_configure_nbytes_minorloop_enabled_offset_enabled (edma_software_tcd_t *stcd, uint32_t nbytes)
 Configures the nbytes if minor loop mapping is enabled and offset is enabled for the software TCD. More...
 
static void edma_hal_stcd_configure_minorloop_offset (edma_software_tcd_t *stcd, edma_minorloop_offset_config_t *config)
 Configures the minorloop offset for the software TCD. More...
 
static void edma_hal_stcd_configure_source_last_adjustment (edma_software_tcd_t *stcd, int32_t size)
 Configures the last source address adjustment for the software TCD. More...
 
static void edma_hal_stcd_configure_dest_address (edma_software_tcd_t *stcd, uint32_t address)
 Configures the destination address for the software TCD. More...
 
static void edma_hal_stcd_configure_dest_offset (edma_software_tcd_t *stcd, uint32_t offset)
 Configures the destination address signed offset for the software TCD. More...
 
static void edma_hal_stcd_configure_dest_last_adjustment_or_scatter_address (edma_software_tcd_t *stcd, uint32_t address)
 Configures the last source address adjustment or the memory address for the next transfer control for the software TCD. More...
 
static void edma_hal_stcd_configure_bandwidth (edma_software_tcd_t *stcd, edma_bandwidth_configuration_t bandwidth)
 Configures the bandwidth for the software TCD. More...
 
static void edma_hal_stcd_configure_majorlink_channel (edma_software_tcd_t *stcd, uint32_t majorchannel)
 Configures the major link channel number for the software TCD. More...
 
static void edma_hal_stcd_set_majorlink (edma_software_tcd_t *stcd, bool isEnabled)
 Enables/Disables the major link channel feature for the software TCD. More...
 
static void edma_hal_stcd_set_scatter_gather_process (edma_software_tcd_t *stcd, bool isEnabled)
 Enables/Disables the scatter/gather feature for the software TCD. More...
 
static void edma_hal_stcd_set_disable_dma_request_after_tcd_done (edma_software_tcd_t *stcd, bool isDisabled)
 Disables/Enables the DMA request after the major loop completes for the software TCD. More...
 
static void edma_hal_stcd_set_half_complete_interrupt (edma_software_tcd_t *stcd, bool isEnabled)
 Enables/Disables the half complete interrupt for the software TCD. More...
 
static void edma_hal_stcd_set_complete_interrupt (edma_software_tcd_t *stcd, bool isEnabled)
 Enables/Disables the interrupt after major loop complete for the software TCD. More...
 
static void edma_hal_stcd_trigger_channel_start (edma_software_tcd_t *stcd)
 Sets the trigger start bits for the software TCD.
 
static void edma_hal_stcd_set_minor_link (edma_software_tcd_t *stcd, bool isEnabled)
 Enables/Disables the channel link after the minor loop for the software TCD. More...
 
static void edma_hal_stcd_set_current_minor_link (edma_software_tcd_t *stcd, bool isEnabled)
 Enables/Disables the current channel link after the minor loop for the software TCD. More...
 
static void edma_hal_stcd_configure_minor_link_channel (edma_software_tcd_t *stcd, uint32_t minorchannel)
 Configures the minor loop link channel for the software TCD. More...
 
static void edma_hal_stcd_configure_current_minor_link_channel (edma_software_tcd_t *stcd, uint32_t minorchannel)
 Configures the minor loop link channel for the software TCD. More...
 
static void edma_hal_stcd_configure_majorcount_minorlink_disabled (edma_software_tcd_t *stcd, uint32_t count)
 Configures the major count if the minor loop channel link is disabled for the software TCD. More...
 
static void edma_hal_stcd_configure_current_majorcount_minorlink_disabled (edma_software_tcd_t *stcd, uint32_t count)
 Configure current major count if minor loop channel link is disabled for software TCD. More...
 
static void edma_hal_stcd_configure_majorcount_minorlink_enabled (edma_software_tcd_t *stcd, uint32_t count)
 Configures the major count if the minor loop channel link is enabled for the software TCD. More...
 
static void edma_hal_stcd_configure_current_majorcount_minorlink_enabled (edma_software_tcd_t *stcd, uint32_t count)
 Configures the current major count if the minor loop channel link is enabled for the software TCD. More...
 
void edma_hal_stcd_push_to_htcd (uint32_t instance, uint32_t channel, edma_software_tcd_t *stcd)
 Copy the software TCD configuration to the hardware TCD. More...
 

EDMA HAL Driver

Overview

The eDMA HAL driver provides a function set to operate the eDMA hardware.

Data Structure Documentation

union edma_tcd_control_t

Data Fields

struct {
   uint16_t   reserve1: 1
 
   uint16_t   majorInterrupt: 1
 Interrupt after the major loop is complete. More...
 
   uint16_t   halfInterrupt: 1
 Interrupt after half of the major loop is complete. More...
 
   uint16_t   disabledDmaRequest: 1
 Disabled DMA request after the major loop is complete. More...
 
   uint16_t   enabledScatterGather: 1
 Enable scatter/gather processing. More...
 
   uint16_t   enableMajorLink: 1
 Enabled major link after the major loop is complete. More...
 
   uint16_t   reserve2: 1
 
   uint16_t   reserve3: 1
 
   uint16_t   majorLinkChannel: 4
 Major link channel number.
 
   uint16_t   reserve4: 2
 
   uint16_t   bandwidthControl: 2
 Bandwidth control configuration.
 
U
 
uint16_t B
 

Field Documentation

uint16_t edma_tcd_control_t::majorInterrupt
uint16_t edma_tcd_control_t::halfInterrupt
uint16_t edma_tcd_control_t::disabledDmaRequest
uint16_t edma_tcd_control_t::enabledScatterGather
uint16_t edma_tcd_control_t::enableMajorLink
struct edma_minorloop_offset_config_t

Data Fields

bool isEnableSourceMinorloop
 
bool isEnableDestMinorloop
 
uint32_t offset
 
union edma_error_status_all_t

Data Fields

struct {
   uint32_t   destinationBusError: 1
 Bus error on destination address.
 
   uint32_t   sourceBusError: 1
 Bus error on the SRC address.
 
   uint32_t   scatterOrGatherConfigurationError: 1
 Error on the Scatter/Gather address.
 
   uint32_t   nbyteOrCiterConfigurationError: 1
 NBYTES/CITER configuration error.
 
   uint32_t   destinationOffsetError: 1
 Destination offset error.
 
   uint32_t   destinationAddressError: 1
 Destination address error.
 
   uint32_t   sourceOffsetError: 1
 Source offset error.
 
   uint32_t   sourceAddressError: 1
 Source address error.
 
   uint32_t   errorChannel: 5
 Error channel number of the cancelled channel number.
 
   uint32_t   _reserved1: 1
 
   uint32_t   channelPriorityError: 1
 Channel priority error.
 
   uint32_t   groupPriorityError: 1
 Group priority error.
 
   uint32_t   transferCancelledError: 1
 Transfer cancelled.
 
   uint32_t   _reserved0: 14
 
   uint32_t   orOfAllError: 1
 Logical OR all ERR status bits.
 
U
 
uint32_t B
 
struct edma_software_tcd_t

Data Fields

uint32_t SADDR
 
uint16_t SOFF
 
uint16_t ATTR
 
union {
   uint32_t   NBYTES_MLNO
 
   uint32_t   NBYTES_MLOFFNO
 
   uint32_t   NBYTES_MLOFFYES
 
}; 
 
uint32_t SLAST
 
uint32_t DADDR
 
uint16_t DOFF
 
union {
   uint16_t   CITER_ELINKNO
 
   uint16_t   CITER_ELINKYES
 
}; 
 
uint32_t DLAST_SGA
 
uint16_t CSR
 
union {
   uint16_t   BITER_ELINKNO
 
   uint16_t   BITER_ELINKYES
 
}; 
 
struct edma_config_t

Data Fields

bool isEnableMinorLoopping
 Enabled the minor loop mapping. More...
 
bool isEnableContinuousMode
 Enabled the continuous mode. More...
 
bool isHaltOnError
 Halt if error happens. More...
 
bool isEnableRoundrobinArbitration
 Enabled round robin or fixed priority arbitration. More...
 
bool isEnableDebug
 Enabled Debug mode. More...
 

Field Documentation

bool edma_config_t::isEnableMinorLoopping
bool edma_config_t::isEnableContinuousMode
bool edma_config_t::isHaltOnError
bool edma_config_t::isEnableRoundrobinArbitration
bool edma_config_t::isEnableDebug

Enumeration Type Documentation

Enumerator
kStatus_EDMA_InvalidArgument 

Parameter is not available for the current configuration.

kStatus_EDMA_Fail 

Function operation failed.

Enumerator
kEdmaBandwidthStallNone 

No eDMA engine stalls.

kEdmaBandwidthStall4Cycle 

eDMA engine stalls for 4 cycles after each read/write.

kEdmaBandwidthStall8Cycle 

eDMA engine stalls for 4 cycles after each read/write.

Function Documentation

void edma_hal_init ( uint32_t  instance,
const edma_config_t init 
)

The function configures the eDMA module with the corresponding global configuration. The configuration is for all channels in this module.

Parameters
moduleeDMA module
initInit data structure
static void edma_hal_cancel_transfer ( uint32_t  instance)
inlinestatic

Stops the executing channel and forces the minor loop to finish. The cancellation takes effect after the last write of the current read/write sequence. The CX clears itself after the cancel has been honored. This cancel retires the channel normally as if the minor loop had completed.

Parameters
instanceeDMA module
static void edma_hal_error_cancel_transfer ( uint32_t  instance)
inlinestatic

Stops the executing channel and forces the minor loop to finish. The cancellation takes effect after the last write of the current read/write sequence. The ECX bit clears itself after the cancel is honored. In addition to cancelling the transfer, ECX treats the cancel as an error condition.

Parameters
instanceeDMA module
static void edma_hal_set_minor_loop_mapping ( uint32_t  instance,
bool  isEnabled 
)
inlinestatic

If enabled, the NBYTES is redefined to include individual enable fields. And the NBYTES field. The individual enable fields allow the minor loop offset to be applied to the source address, the destination address, or both. The NBYTES field is reduced when either offset is enabled.

Parameters
instanceeDMA module
isEnabledEnable or disable.
static void edma_hal_set_continuous_mode ( uint32_t  instance,
bool  isContinuous 
)
inlinestatic

If set, a minor loop channel link does not go through the channel arbitration before being activated again. Upon minor loop completion, the channel activates again if that channel has a minor loop channel link enabled and the link channel is itself.

Parameters
moduleeDMA module
isContinuousWhether the minor loop finish triggers itself.
static void edma_hal_halt ( uint32_t  instance)
inlinestatic

Stalls the start of any new channels. Executing channels are allowed to complete.

Parameters
instanceeDMA module.
static void edma_hal_clear_halt ( uint32_t  instance)
inlinestatic

If a previous eDMA channel is halted, clear operation would resume it back to executing.

Parameters
instanceeDMA module.
static void edma_hal_set_halt_on_error ( uint32_t  instance,
bool  isHaltOnError 
)
inlinestatic

An error causes the HALT bit to be set. Subsequently, all service requests are ignored until the HALT bit is cleared.

Parameters
instanceeDMA module.
isHaltOnErrorhalts or does not halt when an error occurs.
static void edma_hal_set_fixed_priority_channel_arbitration ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module.
static void edma_hal_set_roundrobin_channel_arbitration ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module.
static void edma_hal_set_debug_mode ( uint32_t  instance,
bool  isEnabled 
)
inlinestatic

When in debug mode, the DMA stalls the start of a new channel. Executing channels are allowed to complete. Channel execution resumes either when the system exits debug mode or when the EDBG bit is cleared.

Parameters
instanceeDMA module.
static uint32_t edma_hal_get_error_status ( uint32_t  instance)
inlinestatic

The detailed reason is listed along with the error channel.

Parameters
instanceeDMA module
Returns
Detailed information of the error type in the eDMA module.
static void edma_hal_disable_all_enabled_error_interrupt ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
static void edma_hal_enable_all_channel_error_interrupt ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
static void edma_hal_disable_all_channel_dma_request ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
static void edma_hal_enable_all_channel_dma_request ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
static void edma_hal_clear_all_channel_done_status ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
static void edma_hal_trigger_all_channel_start_bit ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
static void edma_hal_clear_all_channel_error_status ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
static void edma_hal_clear_all_channel_interrupt_request ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
static uint32_t edma_hal_get_all_channel_interrupt_request_status ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
Returns
32 bit data. Every bit stands for an eDMA channel. For example, bit 0 stands for channel 0 and so on.
static uint32_t edma_hal_get_all_channel_error_status ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
Returns
32 bit data. Every bit stands for an eDMA channel. For example, bit 0 stands for channel 0 and so on.
static uint32_t edma_hal_get_all_channel_dma_request_status ( uint32_t  instance)
inlinestatic
Parameters
instanceeDMA module
Returns
32 bit data. Every bit stands for an eDMA channel. For example, bit 0 stands for channel 0 and so on.
static bool edma_hal_check_dma_request_enable_status ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic

Check whether the DMA request of a specified channel is enabled.

Parameters
instanceeDMA module
channeleDMA channel
Returns
True stands for enabled. False stands for disabled.
static void edma_hal_disable_error_interrupt ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic

Disables an error interrupt for the eDMA module.

Parameters
instanceeDMA module
channeleDMA channel
static void edma_hal_enable_error_interrupt ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
static void edma_hal_disable_dma_request ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
static void edma_hal_enable_dma_request ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
static void edma_hal_clear_done_status ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic

The DONE status of the DMA channel is cleared. If the scatter/gather state is enabled, the DONE status in CSR can be cleared but the global DONE statue is still set. This function is to clear the global done state.

Parameters
instanceeDMA module
channeleDMA channel
static void edma_hal_trigger_start_bit ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
static void edma_hal_clear_error_status ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic

*

Parameters
instanceeDMA module
channeleDMA channel
static void edma_hal_clear_interrupt_request ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
static void edma_hal_set_channel_preemp_ability ( uint32_t  instance,
uint32_t  channel,
bool  isDisabled 
)
inlinestatic

If it is disabled, the DMA channel can't suspend a lower priority channel.

Parameters
instanceeDMA module
channeleDMA channel
preemptconfiguration mode for preempt
static void edma_hal_set_channel_preemption_ability ( uint32_t  instance,
uint32_t  channel,
bool  isEnabled 
)
inlinestatic

If enabled, channel can be temporarily suspended by a higher priority channel.

Parameters
instanceeDMA module
channeleDMA channel
preemptconfiguration mode for preempt
static void edma_hal_set_channel_priority ( uint32_t  instance,
uint32_t  channel,
uint32_t  priority 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
priorityPriority of the DMA channel. Different channels should have different priority inside a group.
static void edma_hal_htcd_configure_source_address ( uint32_t  instance,
uint32_t  channel,
uint32_t  address 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
addressmemory address pointing to the source data
static void edma_hal_htcd_configure_source_offset ( uint32_t  instance,
uint32_t  channel,
int16_t  offset 
)
inlinestatic

Sign-extended offset applied to the current source address to form the next-state value as each source read is complete.

Parameters
instanceeDMA module
channeleDMA channel
offsetsigned-offset
static void edma_hal_htcd_configure_source_modulo ( uint32_t  instance,
uint32_t  channel,
edma_modulo_t  modulo 
)
inlinestatic

The value defines a specific address range specified as the value after the SADDR + SOFF calculation is performed on the original register value. Setting this field provides the ability to implement a circular data. For data queues requiring power-of-2 size bytes, the queue should start at a 0-modulo-size address and the SMOD field should be set to the appropriate value for the queue, freezing the desired number of upper address bits. The value programmed into this field specifies the number of the lower address bits allowed to change. For a circular queue application, the SOFF is typically set to the transfer size to implement post-increment addressing with SMOD function restricting the addresses to a 0-modulo-size range.

Parameters
instanceeDMA module
channeleDMA channel
moduloenum type for an allowed modulo
static void edma_hal_htcd_configure_source_transfersize ( uint32_t  instance,
uint32_t  channel,
edma_transfer_size_t  size 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
sizeenum type for transfer size
static void edma_hal_htcd_configure_dest_modulo ( uint32_t  instance,
uint32_t  channel,
edma_modulo_t  modulo 
)
inlinestatic

The value defines a specific address range as the value after the DADDR + DOFF calculation is performed on the original register value. Setting this field provides the ability to implement a circular data. For data queues requiring power-of-2 size bytes, the queue should start at a 0-modulo-size address and the SMOD field should be set to the appropriate value for the queue, freezing the desired number of upper address bits. The value programmed into this field specifies the number of lower address bits allowed to change. For a circular queue application, the SOFF is typically set to the transfer size to implement post-increment addressing with DMOD function restricting the addresses to a 0-modulo-size range.

Parameters
instanceeDMA module
channeleDMA channel
moduloenum type for an allowed modulo
static void edma_hal_htcd_configure_dest_transfersize ( uint32_t  instance,
uint32_t  channel,
edma_transfer_size_t  size 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
sizeenum type for the transfer size
static void edma_hal_htcd_configure_nbytes_minorloop_disabled ( uint32_t  instance,
uint32_t  channel,
uint32_t  nbytes 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
nbytesNumber of bytes to be transferred in each service request of the channel
static void edma_hal_htcd_configure_nbytes_minorloop_enabled_offset_disabled ( uint32_t  instance,
uint32_t  channel,
uint32_t  nbytes 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
nbytesNumber of bytes to be transferred in each service request of the channel
static void edma_hal_htcd_configure_nbytes_minorloop_enabled_offset_enabled ( uint32_t  instance,
uint32_t  channel,
uint32_t  nbytes 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
nbytesNumber of bytes to be transferred in each service request of the channel
uint32_t edma_hal_htcd_get_nbytes_configuration ( uint32_t  instance,
uint32_t  channel 
)

This function decides whether the minor loop mapping is enabled or whether the source/dest minor loop mapping is enabled. Then, the nbytes are returned accordingly.

Parameters
instanceeDMA module
channeleDMA channel
Returns
nbytes configuration
static void edma_hal_htcd_configure_minorloop_offset ( uint32_t  instance,
uint32_t  channel,
edma_minorloop_offset_config_t  config 
)
inlinestatic

Configures both the enable bits and the offset value. If neither source nor dest offset is enabled, offset is not configured.

Parameters
instanceeDMA module
channeleDMA channel
configConfiguration data structure for the minorloop offset
static void edma_hal_htcd_configure_source_last_adjustment ( uint32_t  instance,
uint32_t  channel,
int32_t  size 
)
inlinestatic

Adjustment value added to the source address at the completion of the major iteration count. This value can be applied to restore the source address to the initial value, or adjust the address to reference the next data structure.

Parameters
instanceeDMA module
channeleDMA channel
sizeadjustment value
static void edma_hal_htcd_configure_dest_address ( uint32_t  instance,
uint32_t  channel,
uint32_t  address 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
addressmemory address pointing to destination data
static void edma_hal_htcd_configure_dest_offset ( uint32_t  instance,
uint32_t  channel,
int16_t  offset 
)
inlinestatic

Sign-extended offset applied to the current source address to form the next-state value as each destination write is complete.

Parameters
instanceeDMA module
channeleDMA channel
offsetsigned-offset
static void edma_hal_htcd_configure_dest_last_adjustment_or_scatter_address ( uint32_t  instance,
uint32_t  channel,
uint32_t  address 
)
inlinestatic

If a scatter/gather feature is enabled (edma_hal_htcd_set_scatter_gather_process()):

This address points to the beginning of a 0-modulo-32 byte region containing the next transfer control descriptor to be loaded into this channel. The channel reload is performed as the major iteration count completes. The scatter/gather address must be 0-modulo-32-byte. Otherwise, a configuration error is reported.

else:

An adjustment value added to the source address at the completion of the major iteration count. This value can be applied to restore the source address to the initial value, or adjust the address to reference the next data structure.

Parameters
instanceeDMA module
channeleDMA channel
sizeadjustment value
static void edma_hal_htcd_configure_bandwidth ( uint32_t  instance,
uint32_t  channel,
edma_bandwidth_configuration_t  bandwidth 
)
inlinestatic

Throttles the amount of bus bandwidth consumed by the eDMA. In general, as the eDMA processes the minor loop, it continuously generates read/write sequences until the minor count is exhausted. This field forces the eDMA to stall after the completion of each read/write access to control the bus request bandwidth seen by the crossbar switch.

Parameters
instanceeDMA module
channeleDMA channel
bandwidthenum type for bandwidth control
static void edma_hal_htcd_configure_majorlink_channel ( uint32_t  instance,
uint32_t  channel,
uint32_t  majorchannel 
)
inlinestatic

If the majorlink is enabled, after the major loop counter is exhausted, the eDMA engine initiates a channel service request at the channel defined by these six bits by setting that channel start bits.

Parameters
instanceeDMA module
channeleDMA channel
majorchannelchannel number for major link
static uint32_t edma_hal_htcd_get_majorlink_channel ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
Returns
major link channel number
static void edma_hal_htcd_set_majorlink ( uint32_t  instance,
uint32_t  channel,
bool  isEnabled 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
isEnabledEnable/Disable
static void edma_hal_htcd_set_scatter_gather_process ( uint32_t  instance,
uint32_t  channel,
bool  isEnabled 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
isEnabledEnable/Disable
static bool edma_hal_htcd_is_gather_scatter_enabled ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
Returns
True stand for enabled. False stands for disabled.
static void edma_hal_htcd_set_disable_dma_request_after_tcd_done ( uint32_t  instance,
uint32_t  channel,
bool  isDisabled 
)
inlinestatic

If disabled, the eDMA hardware automatically clears the corresponding DMA request when the current major iteration count reaches zero.

Parameters
instanceeDMA module
channeleDMA channel
isDisabledDisable/Enable.
static void edma_hal_htcd_set_half_complete_interrupt ( uint32_t  instance,
uint32_t  channel,
bool  isEnabled 
)
inlinestatic

If set, the channel generates an interrupt request by setting the appropriate bit in the interrupt register when the current major iteration count reaches the halfway point. Specifically, the comparison performed by the eDMA engine is (CITER == (BITER >> 1)). This half-way point interrupt request is provided to support the double-buffered schemes or other types of data movement where the processor needs an early indication of the transfer's process.

Parameters
instanceeDMA module
channeleDMA channel
isEnabledEnable/Disable
static void edma_hal_htcd_set_complete_interrupt ( uint32_t  instance,
uint32_t  channel,
bool  isEnabled 
)
inlinestatic

If enabled, the channel generates an interrupt request by setting the appropriate bit in the interrupt register when the current major iteration count reaches zero.

Parameters
instanceeDMA module
channeleDMA channel
isEnabledEnable/Disable
static void edma_hal_htcd_trigger_channel_start ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic

The eDMA hardware automatically clears this flag after the channel begins execution.

Parameters
instanceeDMA module
channeleDMA channel
static bool edma_hal_htcd_is_channel_active ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
Returns
True stands for running. False stands for not.
static bool edma_hal_htcd_is_channel_done ( uint32_t  instance,
uint32_t  channel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
Returns
True stands for running. False stands for not.
static void edma_hal_htcd_set_minor_link ( uint32_t  instance,
uint32_t  channel,
bool  isEnabled 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
isEnabledEnable/Disable
static void edma_hal_htcd_set_current_minor_link ( uint32_t  instance,
uint32_t  channel,
bool  isEnabled 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
isEnabledEnable/Disable
static void edma_hal_htcd_configure_minor_link_channel ( uint32_t  instance,
uint32_t  channel,
uint32_t  minorchannel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
minorchannelminor loop link channel
static void edma_hal_htcd_configure_current_minor_link_channel ( uint32_t  instance,
uint32_t  channel,
uint32_t  minorchannel 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
minorchannelminor loop link channel
static void edma_hal_htcd_configure_majorcount_minorlink_disabled ( uint32_t  instance,
uint32_t  channel,
uint32_t  count 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
countmajor loop count
static void edma_hal_htcd_configure_current_majorcount_minorlink_disabled ( uint32_t  instance,
uint32_t  channel,
uint32_t  count 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
countmajor loop count
static void edma_hal_htcd_configure_majorcount_minorlink_enabled ( uint32_t  instance,
uint32_t  channel,
uint32_t  count 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
countmajor loop count
static void edma_hal_htcd_configure_current_majorcount_minorlink_enabled ( uint32_t  instance,
uint32_t  channel,
uint32_t  count 
)
inlinestatic
Parameters
instanceeDMA module
channeleDMA channel
countmajor loop count
uint32_t edma_hal_htcd_get_current_major_count ( uint32_t  instance,
uint32_t  channel 
)
Parameters
instanceeDMA module
channeleDMA channel
Returns
current major loop count
uint32_t edma_hal_htcd_get_begin_major_count ( uint32_t  instance,
uint32_t  channel 
)
Parameters
instanceeDMA module
channeleDMA channel
Returns
begin major loop count
uint32_t edma_hal_htcd_get_unfinished_bytes ( uint32_t  instance,
uint32_t  channel 
)
Parameters
instanceeDMA module
channeleDMA channel
Returns
data bytes to be transferred
uint32_t edma_hal_htcd_get_finished_bytes ( uint32_t  instance,
uint32_t  channel 
)
Parameters
instanceeDMA module
channeleDMA channel
Returns
data bytes to be transferred
static void edma_hal_stcd_configure_source_address ( edma_software_tcd_t stcd,
uint32_t  address 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
addressmemory address pointing to the source data
static void edma_hal_stcd_configure_source_offset ( edma_software_tcd_t stcd,
uint32_t  offset 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
addressmemory address pointing to the source data
static void edma_hal_stcd_configure_source_modulo ( edma_software_tcd_t stcd,
edma_modulo_t  modulo 
)
inlinestatic

The value defines a specific address range as the value after the SADDR + SOFF calculation is performed on the original register value. Setting this field provides the ability to implement a circular data queue. For data queues requiring power-of-2 size bytes, the queue should start at a 0-modulo-size address and the SMOD field should be set to the appropriate value for the queue, freezing the desired number of upper address bits. The value programmed into this field specifies the number of lower address bits allowed to change. For a circular queue application, the SOFF is typically set to the transfer size to implement post-increment addressing with SMOD function restricting the addresses to a 0-modulo-size range.

Parameters
STCDmemory pointing to the eDMA software TCD
moduloenum type for the allowed modulo
static void edma_hal_stcd_configure_source_transfersize ( edma_software_tcd_t stcd,
edma_transfer_size_t  size 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
sizeenum type for transfer size
static void edma_hal_stcd_configure_dest_modulo ( edma_software_tcd_t stcd,
edma_modulo_t  modulo 
)
inlinestatic

The value defines a specific address range as the value after the DADDR + DOFF calculation is performed on the original register value. Setting this field provides the ability to implement a circular data queue easily. For data queues requiring power-of-2 size bytes, the queue should start at a 0-modulo-size address and the SMOD field should be set to the appropriate value for the queue, freezing the desired number of upper address bits. The value programmed into this field specifies the number of lower address bits allowed to change. For a circular queue application, the SOFF is typically set to the transfer size to implement post-increment addressing with DMOD function restricting the addresses to a 0-modulo-size range.

Parameters
STCDmemory pointing to the eDMA software TCD
moduloenum type for allowed modulo
static void edma_hal_stcd_configure_dest_transfersize ( edma_software_tcd_t stcd,
edma_transfer_size_t  size 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
sizeenum type for transfer size
static void edma_hal_stcd_configure_nbytes_minorloop_disabled ( edma_software_tcd_t stcd,
uint32_t  nbytes 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
nbytesNumber of bytes to be transferred in each service request of the channel
static void edma_hal_stcd_configure_nbytes_minorloop_enabled_offset_disabled ( edma_software_tcd_t stcd,
uint32_t  nbytes 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
nbytesNumber of bytes to be transferred in each service request of the channel
static void edma_hal_stcd_configure_nbytes_minorloop_enabled_offset_enabled ( edma_software_tcd_t stcd,
uint32_t  nbytes 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD.
nbytesNumber of bytes to be transferred in each service request of the channel.
static void edma_hal_stcd_configure_minorloop_offset ( edma_software_tcd_t stcd,
edma_minorloop_offset_config_t config 
)
inlinestatic

Configures both the enable bits and the offset value. If neither source nor destination offset is enabled, offset can't be configured.

Parameters
STCDmemory pointing to the eDMA software TCD
configConfiguration data structure for the minorloop offset
static void edma_hal_stcd_configure_source_last_adjustment ( edma_software_tcd_t stcd,
int32_t  size 
)
inlinestatic

Adjustment value added to the source address at the completion of the major iteration count. This value can be applied to restore the source address to the initial value, or adjust the address to reference the next data structure.

Parameters
STCDmemory pointing to the eDMA software TCD
sizeadjustment value
static void edma_hal_stcd_configure_dest_address ( edma_software_tcd_t stcd,
uint32_t  address 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
addressmemory address pointing to destination data
static void edma_hal_stcd_configure_dest_offset ( edma_software_tcd_t stcd,
uint32_t  offset 
)
inlinestatic

Sign-extended offset applied to the current source address to form the next-state value as each destination write is complete.

Parameters
STCDmemory pointing to the eDMA software TCD
offsetsigned-offset
static void edma_hal_stcd_configure_dest_last_adjustment_or_scatter_address ( edma_software_tcd_t stcd,
uint32_t  address 
)
inlinestatic

If the scatter/gather feature is enabled(edma_hal_htcd_set_scatter_gather_process()):

This address points to the beginning of a 0-modulo-32 byte region containing the next transfer control descriptor to be loaded into this channel. The channel reload is performed as the major iteration count completes. The scatter/gather address must be 0-modulo-32-byte. Otherwise, a configuration error is reported.

else:

Adjustment value added to the source address at the completion of the major iteration count. This value can be applied to restore the source address to the initial value, or adjust the address to reference the next data structure.

Parameters
STCDmemory pointing to the eDMA software TCD
sizeadjustment value
static void edma_hal_stcd_configure_bandwidth ( edma_software_tcd_t stcd,
edma_bandwidth_configuration_t  bandwidth 
)
inlinestatic

Throttles the amount of bus bandwidth consumed by the eDMA. As the eDMA processes the minor loop, it continuously generates read/write sequences until the minor count is exhausted. This field forces the eDMA to stall after the completion of each read/write access to control the bus request bandwidth seen by the crossbar switch.

Parameters
STCDmemory pointing to the eDMA software TCD
bandwidthenum type for bandwidth control
static void edma_hal_stcd_configure_majorlink_channel ( edma_software_tcd_t stcd,
uint32_t  majorchannel 
)
inlinestatic

If majorlink is enabled, after the major loop counter is exhausted, the eDMA engine initiates a channel service request at the channel defined by these six bits by setting that channel start bits.

Parameters
STCDmemory pointing to the eDMA software TCD
majorchannelchannel number for major link
static void edma_hal_stcd_set_majorlink ( edma_software_tcd_t stcd,
bool  isEnabled 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
isEnabledEnable/Disable
static void edma_hal_stcd_set_scatter_gather_process ( edma_software_tcd_t stcd,
bool  isEnabled 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
isEnabledEnable/Disable
static void edma_hal_stcd_set_disable_dma_request_after_tcd_done ( edma_software_tcd_t stcd,
bool  isDisabled 
)
inlinestatic

If disabled, the eDMA hardware automatically clears the corresponding DMA request when the current major iteration count reaches zero.

Parameters
STCDmemory pointing to the eDMA software TCD.
isDisabledDisable/Enable
static void edma_hal_stcd_set_half_complete_interrupt ( edma_software_tcd_t stcd,
bool  isEnabled 
)
inlinestatic

If set, the channel generates an interrupt request by setting the appropriate bit in the interrupt register when the current major iteration count reaches the halfway point. Specifically, the comparison performed by the eDMA engine is (CITER == (BITER >> 1)). This half way point interrupt request is provided to support the double-buffered schemes or other types of data movement where the processor needs an early indication of the transfer process.

Parameters
STCDmemory pointing to the eDMA software TCD
isEnabledEnable/Disable
static void edma_hal_stcd_set_complete_interrupt ( edma_software_tcd_t stcd,
bool  isEnabled 
)
inlinestatic

If enabled, the channel generates an interrupt request by setting the appropriate bit in the interrupt register when the current major iteration count reaches zero.

Parameters
STCDmemory pointing to the eDMA software TCD
isEnabledEnable/Disable
static void edma_hal_stcd_set_minor_link ( edma_software_tcd_t stcd,
bool  isEnabled 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
isEnabledEnable/Disable
static void edma_hal_stcd_set_current_minor_link ( edma_software_tcd_t stcd,
bool  isEnabled 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
isEnabledEnable/Disable
static void edma_hal_stcd_configure_minor_link_channel ( edma_software_tcd_t stcd,
uint32_t  minorchannel 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
minorchannelminor loop link channel
static void edma_hal_stcd_configure_current_minor_link_channel ( edma_software_tcd_t stcd,
uint32_t  minorchannel 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
minorchannelminor loop link channel.
static void edma_hal_stcd_configure_majorcount_minorlink_disabled ( edma_software_tcd_t stcd,
uint32_t  count 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
countmajor loop count
static void edma_hal_stcd_configure_current_majorcount_minorlink_disabled ( edma_software_tcd_t stcd,
uint32_t  count 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
countmajor loop count
static void edma_hal_stcd_configure_majorcount_minorlink_enabled ( edma_software_tcd_t stcd,
uint32_t  count 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
countmajor loop count
static void edma_hal_stcd_configure_current_majorcount_minorlink_enabled ( edma_software_tcd_t stcd,
uint32_t  count 
)
inlinestatic
Parameters
STCDmemory pointing to the eDMA software TCD
countmajor loop count
void edma_hal_stcd_push_to_htcd ( uint32_t  instance,
uint32_t  channel,
edma_software_tcd_t stcd 
)
Parameters
STCDmemory pointing to the eDMA software TCD
instanceeDMA module
channeleDMA channel
STCDmemory pointing to the software TCD